package com.google.code.sip.ucenter.ws.dto;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.google.code.sip.ucenter.ws.adapter.DateAdapter;

/**
 * 登录账号实体类
 * 
 * @author Liuye
 * @version 1.0 2010-5-27
 */
@XmlRootElement(name = "user")
@XmlSeeAlso(BaseDto.class)
@XmlAccessorType(XmlAccessType.FIELD)
@SuppressWarnings("serial")
public class UserDto extends BaseDto {
	/**
	 * 用户名
	 */
	private String username;
	/**
	 * 密码
	 */
	@XmlTransient
	private String password;
	/**
	 * 用户号/火秀号
	 */
	private String huoshowId;
	/**
	 * 昵称
	 */
	private String nickName;

	/**
	 * 邮箱
	 */
	private String email;

	/**
	 * 头像
	 * 
	 * 头像图片的url
	 */
	private String avatar;

	/**
	 * 是否可用
	 */
	private boolean enalbed = true;

	/**
	 * 是否锁定
	 */
	private boolean locked = false;

	/**
	 * 创建日期
	 */
	@XmlJavaTypeAdapter(DateAdapter.class)
	private Date createdDate;

	/**
	 * 最后登录日期
	 */
	@XmlJavaTypeAdapter(DateAdapter.class)
	private Date latestLoginDate;

	/**
	 * 最后更新日期
	 */
	@XmlJavaTypeAdapter(DateAdapter.class)
	private Date latestUpdatedDate;

	private String quizId;

	private String answer;

	/**
	 * @return the userId
	 */
	public String getUserId() {
		return super.getId();
	}

	/**
	 * @param userId
	 *            the userId to set
	 */
	public void setUserId(String userId) {
		super.setId(userId);
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the huoshowId
	 */
	public String getHuoshowId() {
		return huoshowId;
	}

	/**
	 * @param huoshowId
	 *            the huoshowId to set
	 */
	public void setHuoshowId(String uid) {
		this.huoshowId = uid;
	}

	/**
	 * @return the nickName
	 */
	public String getNickName() {
		return nickName;
	}

	/**
	 * @param nickName
	 *            the nickName to set
	 */
	public void setNickName(String nickname) {
		this.nickName = nickname;
	}

	/**
	 * @return the createdDate
	 */
	public Date getCreatedDate() {
		return createdDate;
	}

	/**
	 * @param createdDate
	 *            the createdDate to set
	 */
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public boolean isEnalbed() {
		return enalbed;
	}

	public void setEnalbed(boolean enalbe) {
		this.enalbed = enalbe;
	}

	public boolean isLocked() {
		return locked;
	}

	public void setLocked(boolean locked) {
		this.locked = locked;
	}

	public Date getLatestLoginDate() {
		return latestLoginDate;
	}

	public void setLatestLoginDate(Date latestLoginDate) {
		this.latestLoginDate = latestLoginDate;
	}

	public Date getLatestUpdatedDate() {
		return latestUpdatedDate;
	}

	public void setLatestUpdatedDate(Date latestUpdatedDate) {
		this.latestUpdatedDate = latestUpdatedDate;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the avatar
	 */
	public String getAvatar() {
		return avatar;
	}

	/**
	 * @param avatar
	 *            the avatar to set
	 */
	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getQuizId() {
		return quizId;
	}

	public void setQuizId(String quizId) {
		this.quizId = quizId;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
}